package org.dromara.system.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysCityRegion;

import java.io.Serial;

/**
 * 地址（省市区）三级联动业务对象 sys_city_region
 *
 * @author packet
 * @date 2025-09-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SysCityRegion.class, reverseConvertGenerate = false)
public class SysCityRegionBo extends BaseEntity {

    @Serial
    private static final long serialVersionUID = -1450789172095458579L;

    /**
     * 主键id
     */
    private Long id;

    /**
     * 区域名称
     */
    @NotBlank(message = "区域名称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String name;

    /**
     * 区域上级标识
     */
    private Long pid;

    /**
     * 地名简称
     */
    @NotBlank(message = "地名简称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String shortName;

    /**
     * 区域等级（0:国家 1:省 2:市 3:区）
     */
    @NotNull(message = "区域等级（0:国家 1:省 2:市 3:区）不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long level;

    /**
     * 区域编码
     */
    @NotBlank(message = "区域编码不能为空", groups = {AddGroup.class, EditGroup.class})
    private String cityCode;

    /**
     * 邮政编码
     */
    @NotBlank(message = "邮政编码不能为空", groups = {AddGroup.class, EditGroup.class})
    private String postalCode;

    /**
     * 组合名称
     */
    @NotBlank(message = "组合名称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String merName;

    /**
     * 是否热门（N:否 Y:是）
     */
    @NotBlank(message = "是否热门（N:否 Y:是）不能为空", groups = {AddGroup.class, EditGroup.class})
    private String isHot;

    /**
     * 备注
     */
    private String remark;


}
